﻿using System;

using Rarous.TexyNet.Configuration;
using Rarous.TexyNet.Modules;

using Xunit;

namespace Rarous.TexyNet.Test {

  /// <summary>
  /// This is a test class for SmiliesModuleTest and is intended
  /// to contain all SmiliesModuleTest Unit Tests
  /// </summary>
  public class SmiliesModuleTest {

    /// <summary>
    /// A test for RootTest
    /// </summary>
    [Fact]
    public void SmiliesModule_Root_PropertyBehavior() {
      SmiliesModule target = new SmiliesModule();
      string expected = "/img/smiles/";
      target.Root = expected;

      Assert.Equal(expected, target.Root);
    }

    /// <summary>
    /// A test for CssClassTest
    /// </summary>
    [Fact]
    public void SmiliesModule_CssClass_PropertyBehavior() {
      SmiliesModule target = new SmiliesModule();
      string expected = "smile";
      target.CssClass = expected;

      Assert.Equal(expected, target.CssClass);
    }

    /// <summary>
    /// A test for AllowedTest
    /// </summary>
    [Fact]
    public void SmiliesModule_Allowed_PropertyBehavior() {
      SmiliesModule target = new SmiliesModule();
      bool expected = true;
      target.Allowed = expected;

      Assert.Equal(expected, target.Allowed);
    }

    /// <summary>
    /// A test for SmiliesModuleConstructorTest1
    /// </summary>
    [Fact]
    public void SmiliesModule_Constructor_NullConfigElement() {
      SmiliesModule target = new SmiliesModule(null);

      Assert.Equal(String.Empty, target.Root);
      Assert.Equal(String.Empty, target.CssClass);
    }

    /// <summary>
    /// A test for SmiliesModuleConstructorTest
    /// </summary>
    [Fact]
    public void SmiliesModule_Constructor_Default() {
      SmiliesModule target = new SmiliesModule();

      Assert.Equal(String.Empty, target.Root);
      Assert.Equal(String.Empty, target.CssClass);
    }
  }
}
